<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Utils
 *
 * @author instrutor
 */
class Utils {

    static public function aplicaORM($name, $atributos) {
        //Tratamento de campos da tabela
        //Ajuste ORM para ids 
        if (strstr($name,'ID_')) {
            $name = 'id';
        } else {
            foreach ($atributos as $key => $value) {
                if (strtoupper($key) == $name) {
                    $name = $key;
                }
            }
        }
        return $name;
    }

}

?>
